<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>Document</title>
    <style>
        canvas{
            border: 1px solid black;
            display: block;
            margin: 0 auto;
        }
    </style>
</head>
<canvas id="myCanvas" width="500px" height="500px">
    您的浏览器不支持canvas，请更换浏览器
</canvas>
<script>
    var myCanvas = document.getElementById('myCanvas');
    var paint = myCanvas.getContext('2d');
    paint.font = '50px Aral';
    paint.fillStyle = 'blue';  
    paint.fillText('龙夔',50,50);
    
    paint.strokeStyle = 'yellow';
    paint.strokeText('龙夔',100,100); 
   

</script>

<body>

</body>

</html>